package flash.text
{
	import flash.display.InteractiveObject;
	import flash.display.Stage;

	public class TextField extends InteractiveObject
	{
		public function TextField()
		{
			super();
		}
		protected var _text:String = "";
		public function set text(value:String):void
		{
			_text = value;
			changePropertys["text"] = value;
		}
		public function get text():String
		{
			return _text;
		}
		private var ui:Text;
		protected override function init():void
		{
			super.init();
			var Text:Type = importType("UnityEngine.UI.Text");
			ui = renderer.gameObject.AddComponent(Text);
			ui.font = Stage.font;
		}
		public override function render():void
		{
			renderText();
			super.render();
		}
		protected function renderText():void
		{
			if(changePropertys["text"])
			{
				ui.text = text;
			}
		}
	}
}